function [accRes, miRes] = DRCC_reproduce(X, y)
% Input
%     X: nDim * nSmp, normalized data
%     y: nSmp * 1, label
% Output
%     accRes

[nDim, nSmp] = size(X);
nClass = length(unique(y));

[optionsCell, nRepeat] = DRCC_grid;

accRes = zeros(nRepeat, length(optionsCell));
miRes = accRes;
for iOptions = 1:length(optionsCell)
    for iRepeat = 1:nRepeat
        
        options = optionsCell{iOptions};
        smpW = constructW(X, options);
        feaW = constructW(X', options);
        [U, S, V] = DRCC(X', nClass, nClass, feaW, smpW, options); %'
        % clear U S feaW smpW;
        
        % Clustering in the DRCC subspace
        label = litekmeans(V, nClass, 'Replicates', 20);
        label = bestMap(y, label);
        accRes(iRepeat, iOptions) = mean(y == label);
        miRes(iRepeat, iOptions) = MutualInfo(y, label);
    end
end
